/*
@author	Dmitriy Kubarev
@link	http://www.simpleopencart.com
@link	http://www.opencart.com/index.php?route=extension/extension/info&extension_id=4811
*/ 

$(function() {
    
    if (typeof($.fancybox) == 'function') {
        $('.fancybox').fancybox({
        	width: 560,
        	height: 560,
        	autoDimensions: false
        });
    }
    
    if (typeof($.colorbox) == 'function') {
        $('.colorbox').colorbox({
            width: 560,
            height: 560
        });  
    }
    
    if (typeof($.prettyPhoto) !== 'undefined') {
        $("a[rel^='prettyPhoto']").prettyPhoto({
    	   theme: 'light_square', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
    	   opacity: 0.5,
    	   social_tools: "",
    	   deeplinking: false
        });
    }
    
    $('#simpleregister input[name=customer_type]').live('change', function(){
        if ($(this).val() == 'company') {
            $('#simplecheckout_company').show();
        } else {
            $('#simplecheckout_company').hide();
        }
    });
});